<%-- 
    Document   : instr_home
    Created on : Jun 24, 2011, 6:46:22 PM
    Author     : Tyler Powell
--%>

<%@page import="edu.gatech.gellinservlet.model.*"%>
<%@page import="edu.gatech.gellinservlet.presenter.*"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="style.css">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Instructor Home Page - Lab Assistant Pro</title>
    </head>
    <body>
        <%@include file="pro_header.jsp" %>
        <%@include file="instr_list.jsp" %>
        <div id="main">
            <h1>Hello <%=userName%>,</h1>
            <h1>Welcome to the Instructor Page!</h1>
            <% //print out the instructors info
                String userInfo = "<h3>Your information:</h3>";
                userInfo += "Name: " + aUser.getName() + "<br>";
                userInfo += "Username: " + aUser.getUsername() + "<br>";
                userInfo += "ID: " + aUser.getID() + "<br>";

                userInfo += "Courses You Teach: <br>";
                for (Course aCourse : ((Instructor) aUser).getCourseList())
                {
                    userInfo += aCourse.getName() + "<br>";
                }

                out.println(userInfo);
            %>
        </div>
        <% } //ends user_redirect else statement, html is included here %>
        <% } //ends verifySession.jsp, all html is included in else statment %>
    </body>
</html>
